package day12.KeJian;

import java.io.FileInputStream;
import java.io.IOException;

public class Tset10 {
    public static void main(String[] args) throws IOException {
        //创建字节输入流对象
        //FileInputStream(String name)
        FileInputStream fis = new FileInputStream("D://itheima//nb.txt");
        int by;
        /*
            fis.read()：读数据
            by=fis.read()：把读取到的数据赋值给by
            by != -1：判断读取到的数据是否是-1
         */
        while ((by = fis.read())!=-1){
            System.out.println((char)by);
        }
        //释放资源
        fis.close();
    }
}
